import { Nodes } from '@knno/dom';
import { caption, card } from '../components/card/card';
import { JSXProps } from '@knno/dom/jsx';
import { AttrCheck, jsxBuild } from './utils';

export type UICard = Nodes;

type CardProps = JSXProps<UICard>;

const ATTRS: AttrCheck = {};

export function Card(props: CardProps, children: Nodes[]): UICard {
	return jsxBuild(card(), props, children, ATTRS);
}

export type UICaption = Nodes;

type CaptionProps = JSXProps<UICaption>;

export function Caption(props: CaptionProps, children: Nodes[]): UICaption {
	return jsxBuild(caption(), props, children, ATTRS);
}
